angular.module('chats', [])
    .controller('chatsCtrl', ['$scope', 'Chat', function($scope, Chat) {
        $scope.chatsAll = Chat.all();
        $scope.remove = function(c) {
            chatsAll.remove(c);
        };
    }]);